Clean up bootmem initialisation for x86/64. Question still
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 18 Aug 2005 16:04:00 +0000 (16:04 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 18 Aug 2005 16:04:00 +0000 (16:04 +0000)
remains over why boot fails if we try to free up the bottom
1MB of pseudophysical memory...

Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c

index dbb8d31ef32acd8b0870be237dbdc7a4fa33e170..7a7d01dfc23f87d56d0b4fad5ed011a1692dadc7 100644 (file)
@@ -426,16 +426,10 @@ static __init void parse_cmdline_early (char ** cmdline_p)
 #ifdef CONFIG_XEN
 static void __init contig_initmem_init(void)
 {
-        unsigned long bootmap_size, bootmap; 
-
-        bootmap_size = bootmem_bootmap_pages(end_pfn)<<PAGE_SHIFT;
-        bootmap = start_pfn;
-        bootmap_size = init_bootmem(bootmap, end_pfn);
-        reserve_bootmem(bootmap, bootmap_size);
-        
-        free_bootmem(start_pfn << PAGE_SHIFT, (end_pfn - start_pfn) << PAGE_SHIFT);   
-        reserve_bootmem(0, (PFN_PHYS(start_pfn) +
-                            bootmap_size + PAGE_SIZE-1));
+        unsigned long bootmap_size = init_bootmem(start_pfn, end_pfn);
+        free_bootmem(0, end_pfn << PAGE_SHIFT);   
+        /* XXX KAF: Why can't we leave low 1MB of memory free? */
+        reserve_bootmem(0, (PFN_PHYS(start_pfn) + bootmap_size + PAGE_SIZE-1));
 }
 #else
 static void __init contig_initmem_init(void)